Imports System.Windows.Forms

Public Class AddUser
	Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

	Public Sub New()
		MyBase.New()

		'This call is required by the Windows Form Designer.
		InitializeComponent()

		'Add any initialization after the InitializeComponent() call

	End Sub

	'Form overrides dispose to clean up the component list.
	Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
		If disposing Then
			If Not (components Is Nothing) Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(disposing)
	End Sub

	'Required by the Windows Form Designer
	Private components As System.ComponentModel.IContainer

	'NOTE: The following procedure is required by the Windows Form Designer
	'It can be modified using the Windows Form Designer.  
	'Do not modify it using the code editor.
	Friend WithEvents btnOK As System.Windows.Forms.Button
	Friend WithEvents btnCancel As System.Windows.Forms.Button
	Friend WithEvents lblName As System.Windows.Forms.Label
	Friend WithEvents lblAddress As System.Windows.Forms.Label
	Friend WithEvents txtName As System.Windows.Forms.TextBox
	Friend WithEvents txtAddress As System.Windows.Forms.TextBox
	Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
		Me.lblName = New System.Windows.Forms.Label()
		Me.lblAddress = New System.Windows.Forms.Label()
		Me.txtName = New System.Windows.Forms.TextBox()
		Me.txtAddress = New System.Windows.Forms.TextBox()
		Me.btnOK = New System.Windows.Forms.Button()
		Me.btnCancel = New System.Windows.Forms.Button()
		Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider()
		Me.SuspendLayout()
		'
		'lblName
		'
		Me.lblName.Location = New System.Drawing.Point(16, 16)
		Me.lblName.Name = "lblName"
		Me.lblName.Size = New System.Drawing.Size(232, 24)
		Me.lblName.TabIndex = 0
		Me.lblName.Text = "User name (Nick)"
		'
		'lblAddress
		'
		Me.lblAddress.Location = New System.Drawing.Point(16, 80)
		Me.lblAddress.Name = "lblAddress"
		Me.lblAddress.Size = New System.Drawing.Size(232, 24)
		Me.lblAddress.TabIndex = 1
		Me.lblAddress.Text = "Computer name or network address"
		'
		'txtName
		'
		Me.txtName.Location = New System.Drawing.Point(16, 40)
		Me.txtName.Name = "txtName"
		Me.txtName.Size = New System.Drawing.Size(328, 22)
		Me.txtName.TabIndex = 0
		Me.txtName.Text = ""
		'
		'txtAddress
		'
		Me.txtAddress.Location = New System.Drawing.Point(16, 104)
		Me.txtAddress.Name = "txtAddress"
		Me.txtAddress.Size = New System.Drawing.Size(328, 22)
		Me.txtAddress.TabIndex = 1
		Me.txtAddress.Text = ""
		'
		'btnOK
		'
		Me.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK
		Me.btnOK.Location = New System.Drawing.Point(192, 144)
		Me.btnOK.Name = "btnOK"
		Me.btnOK.Size = New System.Drawing.Size(72, 32)
		Me.btnOK.TabIndex = 2
		Me.btnOK.Text = "OK"
		'
		'btnCancel
		'
		Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
		Me.btnCancel.Location = New System.Drawing.Point(272, 144)
		Me.btnCancel.Name = "btnCancel"
		Me.btnCancel.Size = New System.Drawing.Size(72, 32)
		Me.btnCancel.TabIndex = 3
		Me.btnCancel.Text = "Cancel"
		'
		'ErrorProvider1
		'
		Me.ErrorProvider1.DataMember = Nothing
		'
		'AddUser
		'
		Me.AcceptButton = Me.btnOK
		Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
		Me.CancelButton = Me.btnCancel
		Me.ClientSize = New System.Drawing.Size(360, 192)
		Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnCancel, Me.btnOK, Me.txtAddress, Me.txtName, Me.lblAddress, Me.lblName})
		Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
		Me.MaximizeBox = False
		Me.MinimizeBox = False
		Me.Name = "AddUser"
		Me.Text = "Add new user"
		Me.ResumeLayout(False)

	End Sub

#End Region

	Private Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
		If txtName.Text = "" OrElse txtAddress.Text = "" Then
			Me.DialogResult = Windows.Forms.DialogResult.Cancel
			MessageBox.Show("You didn't fill out all the fields. No user will be added.", "No text entered", MessageBoxButtons.OK, MessageBoxIcon.Information)
		End If
	End Sub

End Class
